// import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import { useAdminStore } from './stores/admin'

// 样式仍然整体引入；组件 & 图标由 unplugin-vue-components + ElementPlusResolver 自动按需引入
import 'element-plus/dist/index.css'
import { ElMessage } from 'element-plus'

const app = createApp(App)
const pinia = createPinia()

app.use(pinia)
app.use(router)

// 挂载全局消息（可选）
app.config.globalProperties.$message = ElMessage

// 初始化admin store
const adminStore = useAdminStore()
adminStore.initializeStore()

app.mount('#app')